Learn R Programming

oro.nifti (version 0.1.4)

Convert NIfTI Codes: Convert NIfTI Codes

Description

Codes that appear in the NIfTI-1 header are mapped to meaningful chartacter strings.

Usage

convert.datatype(datatype.code = NULL)
convert.bitpix(bitpix = NULL)
convert.intent(intent.code = NULL)
convert.form(form.code)
convert.units(units, inverse = FALSE)
convert.slice(slice.code)

Arguments

datatype.code
defines data type.
bitpix
is the bit-per-pixel code.
intent.code
is the NIfTI intent code.
form.code
is the x,y,z coordinate system.
units
is the units of pixdim[1..4].
inverse
is a logical value that denotes the direction of unit conversion.
slice.code
is the slice timing order.

Value

  • A character string.

Details

switch statements are used to map a numeric code to the appropriate string.

References

Neuroimaging Informatics Technology Initiative (NIfTI) http://nifti.nimh.nih.gov/

See Also

convert.datatype.anlz, convert.orient.anlz

Examples

Run this code
## No arguments produces a list structure
## Use the abbreviation to obtain the code
convert.datatype()$INT16
## Use the code directly to obtain the abbreviation
convert.datatype(4)

## No arguments produces a list structure
## Use the abbreviation to obtain the code
convert.bitpix()$INT16

## No arguments produces a list structure
## Use the abbreviation to obtain the code
convert.intent()$Estimate
## Use the code directly to obtain the abbreviation
convert.intent(1001)

## 4 = MNI_152
convert.form(4)

## 2 = mm
convert.units(2)
## 8 = sec
convert.units(8)

## 0 = Unknown
convert.slice(0)

Run the code above in your browser using DataLab